]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
keyboard: Disable emoji support on X11
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 26 Apr 2019 08:23:28 +0000 (10:23 +0200)
committerFlorian Müllner <florian.muellner@gmail.com>
Fri, 26 Apr 2019 22:33:28 +0000 (22:33 +0000)
Unlike regular keys that generate key events from a virtual device,
emoji keys rely on the input method to insert the character. However
as the compositor cannot inject IM events into ibus, this only works
in the shell's own entries on X11.

We shouldn't expose mostly broken functionality to the user, so limit
the feature to the wayland session.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1172

js/ui/keyboard.js

index c19930f8d0fcdcd6637569bfe560bf2ebb67f08e..71ebd5596fceb4f936ba7924d608251674076df0 100644 (file)
@@ -1049,7 +1049,7 @@ var Keyboard = class Keyboard {
         this._a11yApplicationsSettings.connect('changed', this._syncEnabled.bind(this));
         this._lastDeviceId = null;
         this._suggestions = null;
-        this._emojiKeyVisible = true;
+        this._emojiKeyVisible = Meta.is_wayland_compositor();
 
         this._focusTracker = new FocusTracker();
         this._focusTracker.connect('position-changed', this._onFocusPositionChanged.bind(this));
@@ -1202,10 +1202,12 @@ var Keyboard = class Keyboard {
         this._keyboardNotifyId = this._keyboardController.connect('active-group', this._onGroupChanged.bind(this));
         this._keyboardGroupsChangedId = this._keyboardController.connect('groups-changed', this._onKeyboardGroupsChanged.bind(this));
         this._keyboardStateId = this._keyboardController.connect('panel-state', this._onKeyboardStateChanged.bind(this));
-        this._emojiKeyVisibleId = this._keyboardController.connect('emoji-visible', this._onEmojiKeyVisible.bind(this));
         this._keypadVisibleId = this._keyboardController.connect('keypad-visible', this._onKeypadVisible.bind(this));
         this._focusNotifyId = global.stage.connect('notify::key-focus', this._onKeyFocusChanged.bind(this));
 
+        if (Meta.is_wayland_compositor())
+            this._emojiKeyVisibleId = this._keyboardController.connect('emoji-visible', this._onEmojiKeyVisible.bind(this));
+
         this._relayout();
     }